#include <stdio.h>
#include <string.h>
#include <gtk/gtk.h>
#include "widgets.h"

gboolean on_key_input(GtkWidget * caller, GdkEventKey * event, gpointer data) 
{
	// On escape pressed
	if      (event->keyval == GDK_KEY_Escape)
	{
		gtk_main_quit();
		return TRUE;
	}
	return FALSE;
}

void connect_signals()
{
	g_signal_connect(window, "key-press-event", G_CALLBACK(on_key_input), NULL);
}
